<template>
  <div class="title">
    <h2>{{ title }}</h2>
    <a href="javascript:;" @click="titleClick"
      >更多
      <i class="el-icon-circle-plus"></i>
    </a>
  </div>
</template>

<script>
export default {
  name: "GlobalTitle",
  components: {},
  data() {
    return {};
  },
  props: {
    title: {
      required: true,
      type: String,
      default: "标题",
    },
  },
  created() {},
  methods: {
    titleClick() {
      console.log("标题的 更多被点击");
      this.$emit("titleClick");
    },
  },
  computed: {},
};
</script>

<style lang="less" scoped>
.title {
  height: 60px;
  h2 {
    font-size: 24px;
    float: left;
    color: #333333;
    // animation: pulse 2s infinite;
  }
  a {
    float: right;
    color: #999999;
    font-size: 14px;
    line-height: 43px;
    &:hover {
      color: @globalColor;
    }
  }
}
</style>
